package com.ruoyi.consume.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.consume.mapper.GraftingclipConsumeTemporaryMapper;
import com.ruoyi.consume.domain.GraftingclipConsumeTemporary;
import com.ruoyi.consume.service.IGraftingclipConsumeTemporaryService;

/**
 * 查看临时领用信息Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-27
 */
@Service
public class GraftingclipConsumeTemporaryServiceImpl implements IGraftingclipConsumeTemporaryService
{
    @Autowired
    private GraftingclipConsumeTemporaryMapper graftingclipConsumeTemporaryMapper;

    /**
     * 查询查看临时领用信息
     *
     * @param graftingclipConsumeTemporaryId 查看临时领用信息ID
     * @return 查看临时领用信息
     */
    @Override
    public GraftingclipConsumeTemporary selectGraftingclipConsumeTemporaryById(Long graftingclipConsumeTemporaryId)
    {
        return graftingclipConsumeTemporaryMapper.selectGraftingclipConsumeTemporaryById(graftingclipConsumeTemporaryId);
    }

    /**
     * 查询查看临时领用信息列表
     *
     * @param graftingclipConsumeTemporary 查看临时领用信息
     * @return 查看临时领用信息
     */
    @Override
    public List<GraftingclipConsumeTemporary> selectGraftingclipConsumeTemporaryList(GraftingclipConsumeTemporary graftingclipConsumeTemporary)
    {
        return graftingclipConsumeTemporaryMapper.selectGraftingclipConsumeTemporaryList(graftingclipConsumeTemporary);
    }

    /**
     * 新增查看临时领用信息
     *
     * @param graftingclipConsumeTemporary 查看临时领用信息
     * @return 结果
     */
    @Override
    public int insertGraftingclipConsumeTemporary(GraftingclipConsumeTemporary graftingclipConsumeTemporary)
    {
        graftingclipConsumeTemporary.setCreateTime(DateUtils.getNowDate());
        return graftingclipConsumeTemporaryMapper.insertGraftingclipConsumeTemporary(graftingclipConsumeTemporary);
    }

    /**
     * 修改查看临时领用信息
     *
     * @param graftingclipConsumeTemporary 查看临时领用信息
     * @return 结果
     */
    @Override
    public int updateGraftingclipConsumeTemporary(GraftingclipConsumeTemporary graftingclipConsumeTemporary)
    {
        graftingclipConsumeTemporary.setUpdateTime(DateUtils.getNowDate());
        return graftingclipConsumeTemporaryMapper.updateGraftingclipConsumeTemporary(graftingclipConsumeTemporary);
    }

    /**
     * 批量删除查看临时领用信息
     *
     * @param graftingclipConsumeTemporaryIds 需要删除的查看临时领用信息ID
     * @return 结果
     */
    @Override
    public int deleteGraftingclipConsumeTemporaryByIds(Long[] graftingclipConsumeTemporaryIds)
    {
        return graftingclipConsumeTemporaryMapper.deleteGraftingclipConsumeTemporaryByIds(graftingclipConsumeTemporaryIds);
    }

    /**
     * 删除查看临时领用信息信息
     *
     * @param graftingclipConsumeTemporaryId 查看临时领用信息ID
     * @return 结果
     */
    @Override
    public int deleteGraftingclipConsumeTemporaryById(Long graftingclipConsumeTemporaryId)
    {
        return graftingclipConsumeTemporaryMapper.deleteGraftingclipConsumeTemporaryById(graftingclipConsumeTemporaryId);
    }

    /**
     * 获取用户下拉框
     *
     * @param
     * @return 结果
     */
    @Override
    public List<GraftingclipConsumeTemporary> getUserName(){
        return graftingclipConsumeTemporaryMapper.getUserName();
    }
}
